#include<stdio.h>

int main()
{
	char *week[7]={"Monday","Tuesday","Wendnesday","Thursday","Friday","Saturday","Sunday"};
	int sign=0,sum=0,key=0;
	int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int z[3]={0},h[3]={2021,11,14};
	scanf("%d %d %d",&z[0],&z[1],&z[2]);
	if(z[0]==2021&&z[1]==11) sum+=14-z[2];
	else
	{
		key=1;
		sum+=14;
	}
	for(sign=h[1]-1;key==1;sign--)
	{
		if((h[0]%4==0&&h[0]&&100!=0)||h[0]%400==0) month[2]=29;
		else month[2]=28;
		if(h[0]==z[0]&&sign==z[1])
		{
			sum+=month[sign]-z[2];
			break;
		}
		else sum+=month[sign];
		if(sign==1)
		{
			sign=13;
			h[0]--;
		}
	}
	//printf("%d\n",sum);
	printf("%s\n",week[6-sum%7]);
	return 0;
}
